#pragma once
#include "shapebuilder.h"

#define SPHERE_CR_GUID _T("5CDEBD33-C4A2-4CFB-9A4D-027FEF32F25D")
class TFunction_Logbook;
class CSphereInfo : public CShapeInfo
{
public:
	CSphereInfo();
	~CSphereInfo();
	virtual void Reset(void);

	virtual void GetParams(CVarList& varList, UINT nID);
	virtual void SetParams(const CVarList& varList, UINT nID);

	virtual bool GetFromLabel(TDF_Label& label);
	virtual void AddToLabel(TDF_Label& label);
	virtual bool ModifyLabel(TDF_Label& label, TFunction_Logbook& log);

	static bool IsModified(TDF_Label& label, const TFunction_Logbook& log);
	//-----------------------------------
	gp_Pnt	ptCenter;
	Standard_Real dRadius;
	//----------------------------------
	enum PARAM_INDEX_SPHERE
	{
		IDX_START = 0,

		CENTER_POINT = 1,
			CENTER_X = CENTER_POINT,
			CENTER_Y,
			CENTER_Z,
		RADIUS = 4,

		IDX_END
	};
};


class CSphereBuilder :
	public CShapeBuilder
{
public:
	CSphereBuilder(void);
	~CSphereBuilder(void);

	bool Build(const CString& szCmdParam, TopoDS_Shape& shape);
	bool Build(CSphereInfo* pShapeInfo, TopoDS_Shape& shape);
};
